//
//  CSGXHomeSaleCategoryView.h
//  CarSalesMS_GCX
//
//  Created by Ssky on 2016/10/25.
//  Copyright © 2016年 Tony. All rights reserved.
//

#import "GXBaseView.h"
@class CSGXHomeSaleCategoryView;

@protocol CSGXCategoryViewActionDelegate <NSObject>

@required

/**
 点击了categoryView上的按钮时调用

 @param categoryView categoryView
 @param selectedIdnex 点击的索引
 */
- (void)gxCategoryView:(CSGXHomeSaleCategoryView *)categoryView withSelectedIndex:(NSInteger)selectedIdnex;

@end

@interface CSGXHomeSaleCategoryView : GXBaseView

#pragma mark properties
/// body上的第几页
@property(nonatomic, assign) NSInteger page;

@property(nonatomic, weak) id<CSGXCategoryViewActionDelegate> categoryActionDelegate;

#pragma mark - methods

+ (instancetype)gxCategoryViewWithDelegate:(id<CSGXCategoryViewActionDelegate>)delegateObj page:(NSInteger)page;


/// 不能选中的按钮
@property (nonatomic, assign) NSInteger unSelectIndex;

///数据源
@property (nonatomic, strong) NSArray<NSString *> * segments;

@property (nonatomic, assign, readonly) NSInteger segmentIndex;
///气泡上的数字  @[@{@"bubbleNumber":@(<#NSNumber#>), @"bubbleIndex":@(<#NSNumber#>), @"bubbleColor":<#UIColor#>}];
@property (nonatomic, strong) NSArray<NSDictionary *> *bubbleDicts;

///下方有没有一条线
@property (nonatomic, assign) BOOL isLine;
///下方横线的颜色
@property (nonatomic, strong) UIColor *lineColor;




- (void)setWidth:(CGFloat)width withIndex:(NSInteger)index;





@end
